package com.example.mapper;

import com.example.entity.Department;
import com.example.entity.DepartmentOrderStatistics;
import com.example.entity.OrderDailyStatistics;
import com.example.entity.WorkOrder;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WorkOrderMapper {

    /**
     * 查询所有
     */
    List<WorkOrder> selectAll(WorkOrder workOrder);

    /**
     * 根据工单编号查询
     */
    WorkOrder selectByOrderNo(String orderNo);

    /**
     * 新增
     */
    int insert(WorkOrder workOrder);

    /**
     * 删除
     */
    int deleteById(Integer id);

    /**
     * 修改
     */
    int updateById(WorkOrder workOrder);

    /**
     * 根据部门id查询
     */
    Department selectByDeptId(Long deptId);

    /**
     * 查询7月每天的工单总量、超期率
     */
    List<OrderDailyStatistics> getDailyOrderStatisticsForMonth(String time);

    /**
     * 查询7月每天的工单总量、超期率
     */
    List<DepartmentOrderStatistics> getDepartmentOrderStatisticsForMonth(String time);
}
